package solution

func V2(nums []int, target int) []int {
	rst := make([]int, 0)

	m := make(map[int]int)

	for k, v := range nums {
		if i, ok := m[target-v]; ok {
			rst = append(rst, i)
			rst = append(rst, k)
			break
		}

		m[v] = k
	}

	return rst
}
